package cn.com.surker.sale.entity;

import cn.com.surker.vo.base.SearchVo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 销售合同开票信息表
 * </p>
 *
 * @author admin
 * @since 2024-08-03
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SaleContractTicket extends SearchVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 标识
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 流程编号
     */
    private String processNo;

    /**
     * 发票号
     */
    private String ticketNo;

    /**
     * 公司ID
     */
    @NotNull(message = "请选择公司")
    private Long orgId;

    private String orgName;

    /**
     * 合同ID
     */
    @NotNull(message = "请选择合同")
    private Long contractId;

    /**
     * 合同名称
     */
    private String contractName;

    /**
     * 开票金额
     */
    @NotNull(message = "请输入开票金额")
    private Double money;

    /**
     * 开票时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd hh:mm:ss")
    private Date ticketTime;

    /**
     * 开票税号
     */
    private String taxCode;

    /**
     * 状态(0:启用1：禁用)
     */
    private Integer status;

    private String ticketPerson;

    /**
     * 备注
     */
    private String remark;

    /**
     * 创建人
     */
    private String creator;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd hh:mm:ss")
    private Date createTime;

    /**
     * 修改人
     */
    private String updator;

    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss",timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd hh:mm:ss")
    private Date updateTime;

    public SaleContractTicket(){}
    public SaleContractTicket(String processNo, String ticketNo, @NotNull(message = "请选择公司") Long orgId, String orgName, @NotNull(message = "请选择合同") Long contractId, String contractName, @NotNull(message = "请输入开票金额") Double money, Date ticketTime, String taxCode, Integer status, String ticketPerson, String remark, String creator, Date createTime) {
        this.processNo = processNo;
        this.ticketNo = ticketNo;
        this.orgId = orgId;
        this.orgName = orgName;
        this.contractId = contractId;
        this.contractName = contractName;
        this.money = money;
        this.ticketTime = ticketTime;
        this.taxCode = taxCode;
        this.status = status;
        this.ticketPerson = ticketPerson;
        this.remark = remark;
        this.creator = creator;
        this.createTime = createTime;
    }
}
